﻿@page "/html2pdf"

<h3>@Localizer["Html2PdfTitle"]</h3>

<h4>@Localizer["Html2PdfDescription"]</h4>

<Tips>
    <div>@((MarkupString)Localizer["Html2PdfNote"].Value)</div>
</Tips>

<Pre class="no-highlight">builder.Services.Configure&lt;HubOptions&gt;(option => option.MaximumReceiveMessageSize = null);</Pre>

<p class="code-label mt-3">@Localizer["Tips1"]</p>

<p>@((MarkupString)Localizer["Html2PdfIntro1"].Value)</p>

<p>@((MarkupString)Localizer["Html2PdfIntro2"].Value)</p>

<p>@((MarkupString)Localizer["Html2PdfIntro3"].Value)</p>

<p>@((MarkupString)Localizer["Html2PdfIntro4"].Value)</p>

<p class="code-label"><code>IHtml2Pdf</code> @Localizer["Tips2"]</p>

<p>@((MarkupString)Localizer["PackageIntro"].Value)</p>

<PackageTips Name="BootstrapBlazor.Html2Pdf" />

<DemoBlock Title="@Localizer["Html2PdfElementTitle"]" Introduction="@Localizer["Html2PdfElementIntro"]" Name="Normal">
    <section ignore>
        <p>@((MarkupString)Localizer["Html2PdfElementDesc"].Value)</p>
        <Button OnClickWithoutRender="OnExportAsync" Text="@Localizer["ExportButtonText"]" Icon="@_exportIcon"></Button>
    </section>
    <Table TItem="Foo" Items="@Items.Take(3)" Id="table-9527">
        <TableColumns>
            <TableColumn @bind-Field="@context.DateTime" Width="180" />
            <TableColumn @bind-Field="@context.Name" />
            <TableColumn @bind-Field="@context.Address" />
        </TableColumns>
    </Table>
</DemoBlock>

<DemoBlock Title="@Localizer["ExportPdfButtonTitle"]" Introduction="@Localizer["ExportPdfButtonIntro"]" Name="ExportPdfButton">
    <section ignore>
        <ExportPdfButton Text="@Localizer["ExportButtonText"]" ElementId="table-9527-01"></ExportPdfButton>
    </section>
    <Table TItem="Foo" Items="@Items.Take(3)" Id="table-9527-01" IsStriped="true">
        <TableColumns>
            <TableColumn @bind-Field="@context.DateTime" Width="180" />
            <TableColumn @bind-Field="@context.Name" />
            <TableColumn @bind-Field="@context.Address" />
        </TableColumns>
    </Table>
</DemoBlock>
